import request from "@/sheep/request";

export default {
  //政策汇报申请列表
    getPolicyreportIndex: (data) =>
    request({
        url: '/api/policyreport/index',
        method: 'GET',
        data,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    //政策汇报添加
    postPolicyreportAdd: (data) =>
    request({
        url: 'api/policyreport/add',
        method: 'POST',
        data,
        custom: {
            showSuccess: true,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: false,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    // 政策汇报详情
    getPolicyreportView: (data) =>
    request({
        url: 'api/policyreport/view',
        method: 'GET',
        data,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
    // 政策汇报审批列表
    getPolicyreportApproveList: (params) =>
    request({
        url: '/api/policyreport/approve_list',
        method: 'GET',
        params,
        custom: {
            showSuccess: false,
            successMsg: '',
            showError: true,
            errorMsg: '',
            showLoading: true,
            loadingMsg: '加载中',
            auth: true,
        },
    }),
        // 政策汇报审批通过
        getPolicyreportPass: (params) =>
        request({
            url: '/api/policyreport/pass',
            method: 'GET',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
        // 政策汇报审批拒绝
        getPolicyreportRefuse: (params) =>
        request({
            url: '/api/policyreport/refuse',
            method: 'GET',
            params,
            custom: {
                showSuccess: true,
                successMsg: '',
                showError: true,
                errorMsg: '',
                showLoading: false,
                loadingMsg: '加载中',
                auth: true,
            },
        }),
};
